package org.celery.modules.order.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum OrderStatusShipEnum {
    TO_BE_CONFIRM("待取货", 0),

    COMPLETED("已完成", 4),

    RETURNED("已取消", 5),
    ;
    private final String name;
    private final int status;

    public static String getName(int status) {
        if (status == TO_BE_CONFIRM.getStatus()) {
            return TO_BE_CONFIRM.getName();
        } else if (status == COMPLETED.getStatus()) {
            return COMPLETED.getName();
        } else if (status == RETURNED.getStatus()) {
            return RETURNED.getName();
        } else {
            return "";
        }
    }

}
